package com.neusoft.utils.mybatis;

import java.io.IOException;

import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;

import com.neusoft.utils.string.StringUtil;

public class Test {

	public static void main(String[] args) throws IOException {
		  ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();        
		  Resource[] resources=resolver.getResources("classpath*:com/neusoft/race/**/mappers/");  
		  System.out.println(resources.length);
		 for (Resource resource : resources) {
			 System.out.println(resource.getFilename());
			 System.out.println(resource.getURL().toString());
			 String url=resource.getURL().toString();
			 url=StringUtil.substringAfterLast(url, "classes/");		 
			 url= StringUtil.replace(url, "/", ".");
			 url=url.substring(0, url.length()-1);
			 System.out.println(url);
		}
		  
	}

}
